﻿using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using System;

namespace BaoVeThanhDia.Sound
{
    public class CustomSoundEffect
    {
        private string link;
        private SoundEffect sound;
        public CustomSoundEffect(string link)
        {
            this.link = link;
        }
        public void Load(ContentManager cont)
        {
            sound = cont.Load<SoundEffect>(link);
        }
        public void Play(Single Loa = 1)
        {
            if (sound != null && !sound.IsDisposed)
                sound.Play(MainPage.isHieuUng ? Loa : 0, 0, 0);
        }
    }
}
